package com.debao;

import com.debao.common.annotation.Anonymous;
import com.debao.common.core.domain.AjaxResult;
import com.debao.system.domain.SysNotice;
import com.debao.system.service.ISysNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/api/notice")
@RestController
@CrossOrigin
public class ApiNotice {


    @Autowired
    private ISysNoticeService noticeService;


    @GetMapping("/info/{id}")
    @Anonymous
    public AjaxResult info(@PathVariable("id") Long id) {
        SysNotice sysNotice = noticeService.selectNoticeById(id);
        return AjaxResult.success(sysNotice);
    }
}
